package com.sabm.dao;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.sabm.model.Role;

@Repository
public class RoleDAOImpl {
	@Autowired
    private SessionFactory sessionFactory;
	//
	public void save(Role role){
		sessionFactory.getCurrentSession().save(role);
	}
	//
	public void delete(Role role){
		sessionFactory.getCurrentSession().delete(role);
	}
	//
	public void update(Role role){
		sessionFactory.getCurrentSession().update(role);
	}
	//
	public void saveOrUpdate(Role role){
		sessionFactory.getCurrentSession().saveOrUpdate(role);
	}
}
